package com.app.micaihu.bean.comment;

import android.text.TextUtils;

import com.app.micaihu.bean.speak.ICommentEntity;
import com.app.micaihu.configure.TypeConstant;
import com.app.micaihu.bean.speak.ILaud;

import java.util.List;

/**
 * Created by Guo on 2016/12/18.
 * <p>
 * 普通评论
 */
public class NormalComment extends ChildComment implements ICommentEntity, ILaud {


    private String parentCmtId;

    private String praiseNum;

    private String publishTime;

    private String headPic;

    private String rankIcon;

    private String rankName;

    private String childNum;

    private String status;

    private List<ChildComment> childList;

    private String isFans;
    private String honourPic;//军团勋章
    private String armyGroupInfo;//所属军团 或 军团职位
    private String gid;//所属军团 id

    public String getGid() {
        return gid;
    }

    public void setGid(String gid) {
        this.gid = gid;
    }

    public String getHonourPic() {
        return honourPic;
    }

    public void setHonourPic(String honourPic) {
        this.honourPic = honourPic;
    }

    public String getArmyGroupInfo() {
        return armyGroupInfo;
    }

    public void setArmyGroupInfo(String armyGroupInfo) {
        this.armyGroupInfo = armyGroupInfo;
    }


    public String getParentCmtId() {
        return parentCmtId;
    }

    public void setParentCmtId(String parentCmtId) {
        this.parentCmtId = parentCmtId;
    }

    public String getPraiseNum() {
        return praiseNum;
    }

    public void setPraiseNum(String praiseNum) {
        this.praiseNum = praiseNum;
    }

    public String getPublishTime() {
        return publishTime;
    }

    public void setPublishTime(String publishTime) {
        this.publishTime = publishTime;
    }

    public String getHeadPic() {
        return headPic;
    }

    public void setHeadPic(String headPic) {
        this.headPic = headPic;
    }

    public String getRankIcon() {
        return rankIcon;
    }

    public void setRankIcon(String rankIcon) {
        this.rankIcon = rankIcon;
    }

    public String getRankName() {
        return rankName;
    }

    public void setRankName(String rankName) {
        this.rankName = rankName;
    }

    public String getChildNum() {
        return childNum;
    }

    public void setChildNum(String childNum) {
        this.childNum = childNum;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public List<ChildComment> getChildList() {
        return childList;
    }

    public void setChildList(List<ChildComment> childList) {
        this.childList = childList;
    }

    public String getIsFans() {
        return isFans;
    }

    public void setIsFans(String isFans) {
        this.isFans = isFans;
    }


    /*****************显示title******************/

    private String commentTitle;

    public String getCommentTitle() {
        return commentTitle;
    }

    public void setCommentTitle(String commentTitle) {
        this.commentTitle = commentTitle;
    }


    /*****************显示title******************/


    @Override
    public String getIToUid() {

        return getUid();

    }

    @Override
    public void setIToUid(String toUid) {

    }

    @Override
    public String getIType() {
        return getType();
    }


    @Override
    public String getNewsId() {
        if (TextUtils.isEmpty(getArticleId()) && !TextUtils.isEmpty(getTopicId())) {
            return getTopicId();
//            return "0";
        } else if (!TextUtils.isEmpty(getArticleId()) && TextUtils.isEmpty(getTopicId())) {
            return getArticleId();
        } else {
            return "0";
        }
    }


    @Override
    public boolean getNewsOrTopic() {
        if (TextUtils.isEmpty(getArticleId()) && !TextUtils.isEmpty(getTopicId())) {
            return false;
        } else if (!TextUtils.isEmpty(getArticleId()) && TextUtils.isEmpty(getTopicId())) {
            return true;
        } else {
            return true;
        }
    }


    @Override
    public String getICommentId() {
        return getId();
    }

    @Override
    public String getIParentCmtId() {
        return getParentCmtId() != null ? getParentCmtId() : "0";
    }


    @Override
    public String getIContent() {
        return getContent();
    }


    /**
     * 当前评论的nickname
     *
     * @return
     */
    @Override
    public String getINickName() {
        return getNickName();
    }

    @Override
    public String getIHeadPic() {
        return getHeadPic();
    }

    @Override
    public String getIRankName() {
        return getRankName();
    }

    @Override
    public String getIRankIcon() {
        return getRankIcon();
    }

    @Override
    public String getIPublishTime() {
        return getPublishTime();
    }

    @Override
    public String getICommentTitle() {
        return getCommentTitle();
    }

    @Override
    public boolean getIIsFans() {
        return TextUtils.equals("1", getIsFans());
    }

    @Override
    public String getIChildNum() {
        return getChildNum();
    }

    @Override
    public List<ChildComment> getIChildList() {
        return getChildList();
    }


    @Override
    public void setIChildList(List<ChildComment> childList) {
        setChildList(childList);
    }

    @Override
    public String getIHonourPic() {
        return getHonourPic();
    }

    @Override
    public String getIArmyGroupInfo() {
        return getArmyGroupInfo();
    }

    @Override
    public String getIFile() {
        return null;
    }


    @Override
    public String getILaudOperateType() {
        return TypeConstant.ZAN_NORMAL;
    }

    @Override
    public String getILaudNum() {
        return getPraiseNum();
    }

    @Override
    public String getILaudType() {
        return TypeConstant.COMMENT_ONE;
    }

    @Override
    public void setILaudNum(String iLaudNum) {
        setPraiseNum(iLaudNum);

    }


}
